package bieudoindexEn;

import common.Utils;

import javax.faces.context.FacesContext;

import javax.portlet.PortletRequest;

import oracle.adf.model.binding.DCIteratorBinding;

public class bieudoindexEnBean {
    private String tieudeEn;
    private String TensanHose;
    private String TensanHNX;
    
    public bieudoindexEnBean() {
        super();
    }
    
    private String TieudeEn() {
        String tieudebieudo = "";
        try {
            PortletRequest request =
                (PortletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
            if (request.getParameter("tieude") != null)
                tieudebieudo = request.getParameter("tieude").toString();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return tieudebieudo;
    }

    public void setTieudeEn(String tieudeEn) {
        this.tieudeEn = tieudeEn;
    }

    public String getTieudeEn() {
        tieudeEn = TieudeEn();
        return tieudeEn;
    }

    public void setTensanHNX(String TensanHNX) {
        this.TensanHNX = TensanHNX;
    }

    public String getTensanHNX() {
        TensanHNX = "HNX";
        DCIteratorBinding IteratorHNX =
            Utils.getIteratorBinding("VnHnxIndexView1Iterator");
        if (IteratorHNX.getCurrentRow().getAttribute("TenSan") != null) {
            TensanHNX =
                    IteratorHNX.getCurrentRow().getAttribute("TenSan").toString();
        }
        return TensanHNX;
    }

    public void setTensanHose(String TensanHose) {
        this.TensanHose = TensanHose;
    }

    public String getTensanHose() {
        TensanHose = "HOSE";
        DCIteratorBinding IteratorHose =
            Utils.getIteratorBinding("VnHastcIndexView1Iterator");
        if (IteratorHose.getCurrentRow().getAttribute("TenSan") != null) {
            TensanHose =
                    IteratorHose.getCurrentRow().getAttribute("TenSan").toString();
        }
        return TensanHose;
    }
}
